<include file="Companycontrol:header" />

<div class="warp">
	<form name="form" id="hiring_add" method="post" action="{:U('Companycontrol/hiring_save',array('hiring_id'=>$list['hiring_id']))}">
  <h2 class="ztitle">添加岗位</h2>
  <ul class="zllist yxlist">
    <li> <i class="txt">岗位标题：</i>
		<input name="title" type="text" class="text" value="{$list.title}" />   
	</li>
    <li> <i class="txt">招聘品牌：</i>
		<volist name="brand" id="b">
		<in name="b.bid" value="$list.brand">
		<input name="brand[]" type="checkbox" value="{$b.bid}" checked /> {$b.brand_name}</br>
		<else />
		<input name="brand[]" type="checkbox" value="{$b.bid}" /> {$b.brand_name}</br>
		</in>
		</volist>    
	</li>
    <li> <i class="txt">招聘门店：</i>
		<volist name="workplace" id="w">
			<strong>{$w.area}</strong> &nbsp;
			<volist name="w.stores" id="s">
			<in name="s.sid" value="$list.workplace">
			<input name="workplace[]" type="checkbox" value="{$s.sid}" checked />{$s.store_name} &nbsp;
			<else />
			<input name="workplace[]" type="checkbox" value="{$s.sid}" />{$s.store_name} &nbsp;
			</in>
			</volist>
			<br />
		</volist>
    </li>
    <li> <i class="txt">招聘商位：</i>
      <select class="hangye" name="hangye">
			<option value="">行业</option>
			<volist name="hangye" id="h">
				<eq name="h.id" value="$list.hid">
					<option value="{$h.id}" selected>{$h.h_name}</option>
				<else/>
					<option value="{$h.id}">{$h.h_name}</option>
				</eq>
			</volist>
      </select>
      <select class="position" name="position">
			<notempty name="posi">
				<volist name="posi" id="poo">
					<eq name="poo.pid" value="$list.pid">
					<option value="{$poo.pid}" selected>{$poo.p_name}</option>
					<else/>
					<option value="{$poo.pid}">{$poo.p_name}</option>
					</eq>
				</volist>
			</notempty>
      </select>
    </li>
  </ul>
  <div class="zw-mb">
    <ul class="zllist yxlist">
      <li> <i class="txt">平均工资：</i>
        <input id="name" class="text" type="text" name="info[salary]" value="{$list.salary}">
      </li>
      <li> <i class="txt">学历要求：</i>
        <select class="dropdown" name="info[edu]" style="width:100%;">
			<option value="">选择学历</option>
			<volist name="edu" id="e">
			<option value="{$e.eid}" <if condition="$e['eid'] eq $list['edu']">selected</if>>{$e.edu}</option>
			</volist>
        </select>
      </li>
      <li><i class="txt">年龄要求：</i>
        <input id="name" class="text t100" type="text" name="info[age_start]" value="{$list.age_start}">
        到
        <input id="name" class="text" type="text" name="info[age_end]" value="{$list.age_end}">
      </li>
      <li><i class="txt">性别要求：</i>
        <input name="info[sex]" type="radio" value="1" <if condition="$list['sex'] eq 1">checked</if> />男<br />
		<input name="info[sex]" type="radio" value="2" <if condition="$list['sex'] eq 2">checked</if> />女<br />
		<input name="info[sex]" type="radio" value="0" <if condition="$list['sex'] eq 0">checked</if> />不限<br />
      </li>
      <li><i class="txt">身高要求：</i>
        <select class="dropdown" name="info[height]" style="width:100%;">
			<option value="">选择身高</option>
			<volist name="height" id="h">
			<option value="{$i}" <if condition="$i eq $list['height']">selected</if>>{$h}</option>
			</volist>
        </select> CM
      </li>
      <li><i class="txt">工作经验：</i>
        <select class="dropdown" name="info[exper]" style="width:100%;">
			<option value="">选择经验</option>
			<volist name="exper" id="e">
			<option value="{$i}" <if condition="$i eq $list['exper']">selected</if>>{$e}</option>
			</volist>
        </select>
      </li>
      <li><i class="txt">工作时间：</i>
        <select class="dropdown" name="info[worktime]" style="width:100%;">
			<option value="">选择工作时间</option>
			<volist name="worktime" id="w">
			<option value="{$w.wid}" <if condition="$w['wid'] eq $list['worktime']">selected</if>>{$w.time}</option>
			</volist>
        </select>
      </li>
      <li><i class="txt">福利待遇：</i>
        <input id="name" class="text t100" type="text" name="info[welfare]" value="{$list.welfare}">
      </li>
      <li class="h30"><i class="txt">岗位描述：</i></li>
      <li style="padding:0">
        <textarea class="text" name="info[intro]">{$list.intro}</textarea>
      </li>
    </ul>
    <ul class="zllist yxlist">
      <li class="h30"><i class="txt">新简历通知：</i></li>
      <li class="tips">当有求职者投递简历时，通知哪个微信账号</li>
      <li class="pd0">
		<volist name="manage" id="m"><in name="m.bid" value="$list.notice"><input name="info[notice][]" type="checkbox" value="{$m.bid}" checked/> {$m.wx_name} <br /><else/><input name="info[notice][]" type="checkbox" value="{$m.bid}"/> {$m.wx_name}<br /></in></volist>
      </li>
    </ul>
  </div>
  <a class="submit" href="javascript:" onclick="$('#hiring_add').submit()">发布</a>
  </form>
</div>
<script language="javascript">
    $(document).ready(function(){
        $('input').iCheck({
            checkboxClass: 'icheckbox_square-blue',
            radioClass: 'iradio_square-blue',
            increaseArea: '20%' // optional
        });
		$(".hangye").change(function(){
			hangye = $(this).val();
			$.post('__URL__/getposition',{hid:hangye},function(res){
				$(".position option").remove();
				$(".position").append("<option value='0'>职位</option>");
				if(res){
					for(i=0;i<res.length;i++){
						$(".position").append("<option value='"+res[i]['pid']+"'>"+res[i]['p_name']+"</option>");
					}
				}
			},'json');
		});
    });
</script>

<include file="Companycontrol:footer" />